package util

import (
	"math/rand"
	"time"
)

/*
 * 生成十位随机数
 * @param n 长度
 */
func RandomString(n int) string {
	var lettes = []byte("asdfghjklzxcvbnmqwertyuiopASDFGHJKLZXCVBNMQWERTYUIOP")
	result := make([]byte, n)

	rand.Seed(time.Now().Unix())

	for i := range result {
		result[i] = lettes[rand.Intn(len(lettes))]
	}
	return string(result)
}
